﻿alter table [dbo].[LogEntry] add constraint [FK_LogEntry_Thread] foreign key (ThreadId) references [Thread](ThreadId)